<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>js数据类型</title>
	</head>
	<body>
		<script type="text/javascript">
			//number
			var age = 20;
			var price = 99.8;
			alert(typeof age);
			alert(typeof price);
			
			//String
			var ch = 'a';
			var name = '张三';
			var addr = "北京";
			alert(typeof ch);
			alert(typeof name);
			alert(typeof addr);
			
			//boolean
			var flag = true;
			var flags = false;
			alert(typeof flag);
			alert(typeof flags);
			
			//null
			var obj = null;
			alert(typeof obj);
			
			//undefined
			var a;
			alert(typeof a);
			
		</script>
		
		
	</body>
</html>